
<HTML>

<HEAD>
<META HTTP-EQUIV="Context-Type" CONTEXT="text/html;charset=windows-1252">
<meta name="GENERATOR" content="Microsoft Internet Assistant for PowerPoint 97">
 <TITLE>Singleton</TITLE> 
</HEAD>

<BODY     >

 <H1>Singleton</H1> 
 <P><UL>
<LI><H2>Intent	
</H2>
<UL>
ensure a class only ever has one instance, and provide a global point of access to it
<BR></UL></UL><UL>
<LI><H2>Applicability 
</H2>
<UL>
<LI>when there must be exactly one instance of a class
<LI>when sole instance should be extensible by subclassing
</UL></UL><UL>
<LI><H2>Structure 
</H2>
</UL><UL>
<H2>
</H2>
</UL><UL>
<LI><H2>Consequences
</H2>
<UL>
<LI>reduced name space pollution
</UL></UL><UL>
<LI><H2>Implementation
</H2>
<UL>
<LI>C++/Java: declare constructor as protected to guard against multiple singleton instances </UL></UL></P>
<P><UL>
Singleton
<BR></UL><UL>

</UL><UL>
method()
</UL><UL>
method()
</UL><UL>

</UL><UL>
static instance()
</UL><UL>

</UL><UL>
static instance</UL></P>
<P></P> 
<P>
<TABLE>
  <TD HEIGHT=100 WIDTH=100> <A HREF="tsld030.htm">Previous slide</A> </TD>
  <TD HEIGHT=100 WIDTH=100> <A HREF="tsld032.htm">Next slide</A> </TD>
  <TD HEIGHT=100 WIDTH=150> <A HREF="tsld001.htm">Back to first slide</A> </TD>
  <TD HEIGHT=100 WIDTH=150> <A HREF="sld031.htm">View graphic version</A> </TD>
</TABLE>
<BR>
</P>



</Body>
</HTML>
